
# ifndef __DFX_STREAM_H__
# define __DFX_STREAM_H__

# include "dfxFile.h"

namespace DFX
{
    class DFX_EXPORT InputStream
    {
    public:

        InputStream()
        {
        }

        virtual ~InputStream()
        {
        }

        virtual const String& GetFileName() const = 0;

        virtual UInt64 GetSize() const = 0;
        virtual UInt64 GetPosition() const = 0;
        virtual UInt64 GetBytesLeft() const = 0;

        virtual void Seek(UInt64 position) = 0;

        virtual bool Eof() = 0;
        virtual UInt64 Read(void *buffer, UInt64 size) = 0;

        virtual const UInt8* MapStream() const = 0;
        virtual const UInt8* MapStreamFromCurrentPosition() const = 0;
    };

    class DFX_EXPORT OutputStream
    {
    public:

        OutputStream()
        {
        }

        virtual ~OutputStream()
        {
        }

        virtual void Seek(UInt64 position) = 0;

        virtual UInt64 GetPosition() const = 0;
        virtual UInt64 Write(const void *buffer, UInt64 size) = 0;
    };
}

# endif